package com.base.cn.platform.os.dao.order.order;

import com.base.cn.platform.os.common.mybatis.BaseDao;
import com.base.cn.platform.os.entity.order.count.OrderSubjectNum;
import com.base.cn.platform.os.entity.order.order.OrderDetails;
import com.base.cn.platform.os.entity.statistics.goods.GoodsPayRankingCount;
import com.base.cn.platform.os.entity.statistics.trade.TradePayOrderNum;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 订单流水记录Dao
 *
 * @author s.li
 * @create 2018-05-08-11:36
 */
@Mapper
public interface OrderDetailsDao extends BaseDao<OrderDetails> {

    /**
     * 统计专业的销售额度的对比数据
     * @param clazz
     * @return List<OrderSubjectNum>
     */
    List<OrderSubjectNum> queryOrderSubjectPriceCountNum(@Param("clazz") Class<OrderDetails> clazz);

    /**
     * 获取商品的下单量
     * @param clazz
     * @param params 查询条件
     * @return List<Map<String,Object>>
     */
    List<Map<String,Object>> queryShopOrderNumList(@Param("clazz") Class<OrderDetails> clazz,
                                                   @Param("params") Map<String,String> params);

    /**
     * 获取商品的下单量
     * @param clazz
     * @param timeSql 查询条件
     * @return List<Map<String,Object>>
     */
    List<GoodsPayRankingCount> queryGoodsPayTopFiveList(@Param("clazz") Class<OrderDetails> clazz,
                                                        @Param("timeSql") String timeSql);

    /**
     * 查看交易分析统计中的交易数据
     * @param clazz
     * @param params
     * @return List<TradePayOrderNum>
     */
    List<TradePayOrderNum> tradePayOrderNumList(@Param("clazz") Class<OrderDetails> clazz,
                                                @Param("params") Map<String,Object> params);
}
